package com.ruoyi.web.controller.durian.task;

import com.ruoyi.durian.service.LlOrderService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component("orderTask")
public class OrderTask {

    @Resource
    private LlOrderService llOrderService;

    private static final Logger LOGGER = LoggerFactory.getLogger(OrderTask.class);

    /**
     * 定时任务检查未支付的订单
     */
    public void checkNotPayOrder() {
        LOGGER.info("开始执行未支付订单检查！！！》》》》");
        Integer num = llOrderService.checkNotPayOrder();
        LOGGER.info("系统发现未支付订单共-{}个，系统进行提醒支付！！！》》》》", num);
    }
}
